|
![](/i/fill.gif) |
45254e09$1@news.povray.org...
>
> Would anyone be so kind as to show me a simple example of how to
effectively
> use these images to map onto a disc (or similar)?
>
> - How (?)
This way ;-)
camera {
location <0.0, 15, -30>
direction 1.5*z
right x*image_width/image_height
look_at <0.0, 0.0, 0.0>
angle 5
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1>*1.5 // light's color
translate <-30, 3, -30> *1000
}
#declare Int_radius =1; //disc minor radius
#declare Ring_width= 0.2; //disc width
#declare Lum=3; // color luminance
#declare T_factor=0.5; //transparency map amount
// functionalization of the colormap
#declare img =
pigment{
image_map{
png"sat_ring_color.png"
}
scale Ring_width
}
#declare f_img =
function{
pigment{ img }
}
// functionalization of the transparency map
#declare trans =
pigment{
image_map{
png"transparency.png"
}
scale Ring_width
}
#declare f_trans =
function{
pigment{ trans }
}
//recombination of color componants in a concentric way
#declare Ring_pig =
pigment{
average
pigment_map{
[1 function{ f_img(sqrt(x*x+y*y)-Int_radius,0,0).x } color_map{[0 rgb
0][1 rgb x*Lum]} ]
[1 function{ f_img(sqrt(x*x+y*y)-Int_radius,0,0).y } color_map{[0 rgb
0][1 rgb y*Lum]} ]
[1 function{ f_img(sqrt(x*x+y*y)-Int_radius,0,0).z } color_map{[0 rgb
0][1 rgb z*Lum]} ]
[1 function{ f_trans(sqrt(x*x+y*y)-Int_radius,0,0).z } color_map{[0 rgb
0][1 rgbt<0,0,0,1>*T_factor ]} ]
}
}
disc { <0, 0, 0>, z,Int_radius+Ring_width, Int_radius texture {pigment
{Ring_pig }finish{ambient 0 diffuse 1 brilliance 0.2}}rotate x*90}
sphere{0,Int_radius*.8 texture{pigment{color rgb 1} finish {ambient 0
diffuse .6 }}}//place holder
HTH
Marc
Post a reply to this message
|
![](/i/fill.gif) |